From: Debian Med Packaging Team Date: Thu, 16 Oct 2025 20:15:12 +0000 (-0400) Subject: zcf-simde-crc32c X-Git-Tag: archive/raspbian/2.17.0+ds-6+rpi1^2^2^2^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a8b71cce6854e34eef7bb0275e3edaa7b28538f2;p=ncbi-blast%2B.git zcf-simde-crc32c Gbp-Pq: Name zcf-simde-crc32c --- diff --git a/c++/src/util/compress/zlib_cloudflare/Makefile.zlib_cf.lib.unix b/c++/src/util/compress/zlib_cloudflare/Makefile.zlib_cf.lib.unix index 0157443c..6b79ca0f 100644 --- a/c++/src/util/compress/zlib_cloudflare/Makefile.zlib_cf.lib.unix +++ b/c++/src/util/compress/zlib_cloudflare/Makefile.zlib_cf.lib.unix @@ -1,6 +1,6 @@ # $Id: Makefile.zlib_cf.lib.unix 677587 2024-01-18 20:07:53Z ivanov $ -ifneq "" "$(findstring --arm,$(signature))$(findstring --aarch64,$(signature))" +ifneq "" "$(findstring --arm64,$(signature))$(findstring --aarch64,$(signature))" crc32.o: CFLAGS += -march=armv8-a+crc deflate.o: CFLAGS += -march=armv8-a+crc endif diff --git a/c++/src/util/compress/zlib_cloudflare/deflate.c b/c++/src/util/compress/zlib_cloudflare/deflate.c index cb495d3b..9b6fa1d9 100644 --- a/c++/src/util/compress/zlib_cloudflare/deflate.c +++ b/c++/src/util/compress/zlib_cloudflare/deflate.c @@ -129,27 +129,11 @@ static const config configuration_table[10] = { /* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */ #define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0)) -#ifdef __aarch64__ - -#include -#include -static uint32_t hash_func(deflate_state *s, void* str) { - return __crc32cw(0, *(uint32_t*)str) & s->hash_mask; -} - -#elif defined __x86_64__ || defined _M_AMD64 - -#include +#include static uint32_t hash_func(deflate_state *s, void* str) { - return _mm_crc32_u32(0, *(uint32_t*)str) & s->hash_mask; + return simde_mm_crc32_u32(0, *(uint32_t*)str) & s->hash_mask; } -#else - -#error "Only 64-bit Intel and ARM architectures are supported" - -#endif - /* =========================================================================== * Insert string str in the dictionary and return the previous head * of the hash chain (the most recent string with same hash key).